#ifndef LOG_H_INCLUDED
#define LOG_H_INCLUDED

//#include "log4cplus/logger.h"
//#include "log4cplus/fileappender.h"
//#include <log4cplus/consoleappender.h>
//#include <log4cplus/configurator.h>

#include <iostream>
using std::string;
using std::cout;
using std::endl;

enum LOG_TYPE{L_NOTICE, L_WARN, L_ERROR, L_FATAL};
void Log(string msg, LOG_TYPE type = L_NOTICE);

//#define Debug(p) LOG4CPLUS_DEBUG(stdlog::_logger, p)
#define Debug(p) cout << p << endl;

// 日志控制类，全局共用一个日志
class log
{
public:
    bool load(string ctg = string());
    static log& instance();

   // static log4cplus::Logger _logger;
 
private:
    log(){};
    virtual ~log(){};

};
 
#endif // LOG_H_INCLUDED
